# _*_ coding utf-8 _*_
# FILENAME：BaseMainWindow.py
# DESCRIPTION: 窗体基类
# AUTH: jarvis
# DATE: 2022/6/94:02 下午
import os

from PyQt5 import QtCore, QtGui
from PyQt5.QtWidgets import QMainWindow

from utils import assetsUtils


class BaseMainWindow(QMainWindow):
    def __init__(self):
        super(BaseMainWindow, self).__init__()
        self.setupUi(self)

    def setupUi(self, MainWindow):
        # 图标
        icon_path = assetsUtils.get_ico()
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(icon_path), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        MainWindow.setWindowIcon(icon)

        MainWindow.resize(1200, 600)
        MainWindow.setWindowModality(QtCore.Qt.ApplicationModal) #  模态窗口